ps_resp_mouse=[];

mouse_id=[];
for ind=1:length(AV_data)
    mouse_id(ind)=sum(double(AV_data(ind).mouse_id));
end

mouse_ids=unique(mouse_id);

mouse_ids=mouse_ids([3 4 7 8 9]);

for ind=1:length(mouse_ids)
    
    exp_ns=find(mouse_id==mouse_ids(ind))
    
    curr_ind=zeros(length(ps_snip_time),1);
    for knd=1:length(exp_ns)
        curr_ind=curr_ind+double(ps_snip_time(:,9)==exp_ns(knd));
    end
    curr_ind=logical(curr_ind);
    curr_ind=curr_ind&ps_snip_time(:,4)==1;
    sum(curr_ind)
    try
        ps_resp_mouse(:,ind)=mean(ps_snips(:,curr_ind),2)-mean(mean(ps_snips(501:1000,curr_ind),2));
    catch
        ps_resp_mouse(:,ind)=NaN;
    end
    
end

figure;plot(ps_resp_mouse,'k')
xlim([501 6000])
ylim([-0.02 0.10])
box off
xlabel('Time [s]')
set(gca,'xtick',[1000:1000:6000],'xticklabel',[0:5])